function getRnd0(scope){
    var rnd = Math.random();
    return Math.round(rnd*scope);
}

function getRnd(min, max) {
    var rnd = Math.random();
    return min + Math.round(rnd * (max - min));
}